JavaScript

{dialog.object}jsChartSetProperties Method

Syntax

{dialog.Object}.jsChartSetProperties(UXJavascriptChart, properties [,drawMethod [,methodParameters]])

Arguments

UXJavascriptChartString

The name (i.e. Chart id) of the Javascript chart you want to set properties.

propertiesJSON

A JSON object with values for the properties you want to set. If the Chart is made up of multiple sub-charts, then you must pass in an array of property objects. For example, say that a Chart is comprised of a Bar Chart and a Pie Chart superimposed on the Bar Chart in the top left hand corner and you want to set the colors of the bars in the Bar Chart and the pie slices in the Pie Chart. Since the Chart is comprised of two sub-charts, you must pass in an array of properties. For example: [ {colors: ['blue']}, {colors: ['blue','red','green'}]

drawMethodString

You can override the default 'draw' method specified when the chart was defined. For example, if the chart was originally defined to use the 'grow' method (so that the chart is animated when it is drawn), you can override this and specify the 'draw' method (so that the chart is redrawn at its new size without animation.

methodParametersObject

If you specify an explicit redrawMethod, if the method that is specified takes a parameter, you can use this argument to supply the parameter. For example, the 'grow' method can take this parameter: {frames: 100}

Description

Change the properties of the Javascript Chart.

Discussion

You can optionally pass in a draw method to redraw the chart without animation, or with a specified animation option.

See Also